package com.meichis.yndms.model;

import java.io.Serializable;
import java.util.Comparator;

/**
 * @author xmy
 * @title
 * @remake
 * @create 2021-05-29 16:58
 */
public class SalesRank implements Serializable {


    /**
     * UserName : 岳仑诚达
     * TerminalNum : 0.0
     * SalesMoney : 0.0
     */

    //人员名称
    private String UserName;
    //门店名称
    private String TerminalName;
    //未销售门店数量
    private double TerminalNum;
    //销售金额
    private double SalesMoney;
    //门店销售件数
    private double SalesNum;
    //个人销售件数
    private int SalesIQuantity;

    public int getSalesIQuantity() {
        return SalesIQuantity;
    }

    public void setSalesIQuantity(int salesIQuantity) {
        SalesIQuantity = salesIQuantity;
    }

    public String getTerminalName() {
        return TerminalName;
    }

    public void setTerminalName(String terminalName) {
        TerminalName = terminalName;
    }

    public double getSalesNum() {
        return SalesNum;
    }

    public void setSalesNum(double salesNum) {
        SalesNum = salesNum;
    }

    public String getUserName() {
        return UserName;
    }

    public void setUserName(String UserName) {
        this.UserName = UserName;
    }

    public double getTerminalNum() {
        return TerminalNum;
    }

    public void setTerminalNum(double TerminalNum) {
        this.TerminalNum = TerminalNum;
    }

    public double getSalesMoney() {
        return SalesMoney;
    }

    public void setSalesMoney(double SalesMoney) {
        this.SalesMoney = SalesMoney;
    }


    public static class CategoryComparator implements Comparator<SalesRank> {

        @Override
        public int compare(SalesRank s1, SalesRank s2) {
            if ((s2.getSalesMoney() - s1.getSalesMoney()) > 0) {
                return 1;
            } else if (s2.getSalesMoney() - s1.getSalesMoney() < 0) {
                return -1;
            } else {
                return 0;
            }
        }
    }
}
